<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

	<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
	<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

	<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
	<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/workspace.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
	<title>后台管理</title>
</head>

<body class="body_ifm">
	<form action="index.php?m=admin_message&c=show" method="post" id='checkform'>
		<input type="hidden" name="userid" id="userid" value="">
	  	<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
	</form>

	<div id="info_div"  style="display:none; width: 390px; ">
		<div class="" style=" margin-top:10px;">
			<form class="layui-form" action="index.php?m=crm_salesman_list&c=status" target="supportiframe" method="post" id="formstatus">
				<table cellspacing='1' cellpadding='1' class="admin_examine_table">
					<tr>
						<th width="120">设置在职/离职：</th>
						<td align="left">
							<div class="layui-form-item">
							<div class="layui-input-block">
								<input name="status" id="state1" value="1" title="在职" type="radio"/>
								<input name="status" id="state2" value="2" title="离职" type="radio"/>
							</div>
							</div>
						</td>
					</tr>
				    <tr>
						<td colspan='2' align="center">
					 		<input type="submit"  value='确认' class="admin_examine_bth">
				        	<input type="button" id="zxxCancelBtn" onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'>
						</td>
					</tr>
				</table>
				<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
				<input name="uid" value="0" type="hidden">
	    	</form>
	  	</div>
	</div>
	
	<form action='index.php' method='get' class='layui-form' style='display:none;' id="search_form"  autocomplete='off'>
		<input type="hidden" name="m" value="crm_audit" />
		<div class="crm_record_list">
			<div class="crm_record_name"><span class="admin_required_icon"></span>起始日期：</div>
			<div class="crm_record_textbox">
				<div class="layui-form-item">
					<div class="layui-inline">
						<div class="layui-input-inline">
							<input type="text" id="stime" name="stime"  class="layui-input" style="width:300px">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="crm_record_list">
			<div class="crm_record_name"><span class="admin_required_icon"></span>结束日期：</div>
			<div class="crm_record_textbox">
				<div class="layui-form-item">
					<div class="layui-inline">
						<div class="layui-input-inline">
							<input type="text" id="etime" name="etime"  class="layui-input" style="width:300px">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="crm_record_list" >
			<span class="crm_record_name">&nbsp;</span>
			<div class="crm_record_textbox">
				<input type="submit"  value='确认' class="admin_examine_bth">
				<input type="button"  onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消' style="margin-left:10px;">
			</div> 	
		</div>
	</form>
	
	<div class="infoboxp">
				<div class="tabs_info" style="height:36px;">
           	<ul>
	            <li class="curr">
	                <a href="###">查账助手</a>
	         	</li>
           	</ul>	
       	</div>
		<div class="crm_searctime">
			<ul>
				<li {yun:}if $smarty.get.time=='' && !$smarty.get.stime && !$smarty.get.etime{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_audit">全部</a></li>
				<li {yun:}if $smarty.get.time==-1{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_audit&time=-1">今天</a></li>
				<li {yun:}if $smarty.get.time==1{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_audit&time=1">昨天</a></li>
				<li {yun:}if $smarty.get.time==7{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_audit&time=7">7天内</a></li>
				<li {yun:}if $smarty.get.time==30{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_audit&time=30">30天内</a></li>
				<li {yun:}if $smarty.get.time==90{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_audit&time=90">90天内</a></li>
				<li {yun:}if $smarty.get.stime || $smarty.get.etime {/yun}class='curr'{yun:}/if{/yun}><a href="javascript:void(0);" onclick='searchForm();'>自定义</a></li>
			</ul>
		</div>

		<div class="clear"></div>
		  
  		<div class="table-list" style="margin-top:10px;">
    		<div class="admin_table_border">
      			
      			<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
      			<form action="index.php"  target="supportiframe" name="myform" method="get" id='myform'>
			        
			        <input name="m" value="crm_audit" type="hidden"/>
			        <input name="c" value="del" type="hidden"/>
			        
			        <table width="100%">
			          	
			          	<thead>
			            	<tr class="admin_table_top">
				              	<th width="100"> 
					                {yun:}if $smarty.get.t=="date" && $smarty.get.order=="asc"{/yun} 
					                  	<a href="index.php?m=crm_audit&order=desc&t=date">日期<img src="images/sanj.jpg"/></a>
					                {yun:}else{/yun}
					                  	<a href="index.php?m=crm_audit&order=asc&t=date">日期<img src="images/sanj2.jpg"/></a> 
					                {yun:}/if{/yun}
				              	</th>
					         	<th>收入</th>
					          	<th align="left">业务员开通套餐金额 / 查看详情</th>
					          	<th align="left">支出</th>
					         	<th align="left">合计</th>
			            	</tr>
			          	</thead>
			          	
			          	<tbody>
			          	{yun:}foreach item=v key=key from=$order{/yun}
			          		<tr {yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.uid{/yun}">
			            		
			            		<td align="center" class="td1">{yun:}$v.date{/yun}</td>
			            		
			            		<td align="center">{yun:}$v.num{/yun}</td>
					            
					            <td align="left">
									{yun:}$v.salesmanNum{/yun}
									    &nbsp;&nbsp;
									{yun:}if $v.salesmanNum > 0{/yun}
										<a href="index.php?m=crm_audit&c=detail&date={yun:}$v.date{/yun}" style="color:#f60; text-decoration:underline">查看详情</a>
									{yun:}/if{/yun}
					            </td>
					            
					            <td align="left">0</td>
					            <td align="left">{yun:}$v.num{/yun}</td>
					            
			          		</tr>
			          	{yun:}/foreach{/yun}
			          	
			          	{yun:}if $total > $config.sy_listnum{/yun}
							<tr>
								{yun:}if $pagenum == 1{/yun}
									<td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
								{yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
									<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
								{yun:}else if $pagenum == $pages{/yun}
									<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
								{yun:}/if{/yun}
								<td colspan="5" class="digg">{yun:}$pagenav{/yun}</td>
							</tr>
						{yun:}/if{/yun}
			        	</tbody>
			        </table>
		        	<input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
		      	</form>
    		</div>
  		</div>
	</div>

	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>

	<script>
	
		layui.use(['form', 'laydate'], function(){
		  	var laydate = layui.laydate
		    	,form = layui.form
		    	,$ = layui.$;
		
			laydate.render({
				elem : '#stime'
				,type : 'date'
			});
			
			laydate.render({
				elem : '#etime'
				,type : 'date'
			});
		});
		
		function searchForm(){
			layer.open({
				type: 1, 
				anim: 5,
				title: '自定义搜索',
				content: $('#search_form'),  
				area:["450px", "280"],
				offset: ['20px', ''],
			});
		}
	</script>
	
	{yun:}include file="$adminstyle/checkdomain.htm"{/yun}
	
</body>
</html>
